﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BugSnapper
{
    public partial class frmKeyLess : Form
    {
        private ucBugSnapper ucBugSnapper { get; set; }
        private Logger Logger { get; set; }
        public frmKeyLess(ucBugSnapper ucBugSnapper)
        {
            InitializeComponent();
            this.ucBugSnapper = ucBugSnapper;
            this.Logger = new Logger();
        }

        private void btnKeyLess_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.ucBugSnapper != null)
                {
                    if (this.ucBugSnapper.ParentForm != null)
                    {
                        ((MainForm)this.ucBugSnapper.ParentForm).ShowKeyLessWindow(true);
                        this.ucBugSnapper.KeyStrokeRaised();
                        ((MainForm)this.ucBugSnapper.ParentForm).ShowKeyLessWindow(false);
                    }
                }
            }
            catch (Exception ex)
            {
                this.Logger.ProcessError(ex);
            }
        }

        private void btnKeyLess_MouseHover(object sender, EventArgs e)
        {
            try
            {
                this.toolTip1.SetToolTip(this.btnKeyLess, "Snap Screen");
            }
            catch (Exception ex)
            {
                this.Logger.ProcessError(ex);
            }
        }
    }
}
